<!DOCTYPE html>
<html>
  <head>
  <title>
      
          Emoji Support - jun&#39;s home
      
  </title>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta name="author" content="map[]" />
  <link rel="shortcut icon" type="image/x-icon" href="https://dengxiujun.gitee.io/img/favicon.ico">

  
  
  
  
  
  <link rel="stylesheet" href="https://dengxiujun.gitee.io/style.min.7135f8265f0e5668aaf68b968cf560537cb8017044dfb3bdcd7a5d0d8a806b3d.css">
  <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.1/css/all.css" integrity="sha384-50oBUHEmvpQ+1lW4y57PTFmhCaXp0ML5d60M1M7uH2+nqUivzIebhndOJK28anvf" crossorigin="anonymous">

  
  

  <meta property="og:title" content="Emoji Support" />
<meta property="og:description" content="Emoji can be enabled in a Hugo project in a number of ways." />
<meta property="og:type" content="article" />
<meta property="og:url" content="https://dengxiujun.gitee.io/blog/emoji-support/" />
<meta property="article:published_time" content="2019-03-05T00:00:00&#43;00:00"/>
<meta property="article:modified_time" content="2019-03-05T00:00:00&#43;00:00"/>

<meta itemprop="name" content="Emoji Support">
<meta itemprop="description" content="Emoji can be enabled in a Hugo project in a number of ways.">


<meta itemprop="datePublished" content="2019-03-05T00:00:00&#43;00:00" />
<meta itemprop="dateModified" content="2019-03-05T00:00:00&#43;00:00" />
<meta itemprop="wordCount" content="124">



<meta itemprop="keywords" content="" />
<meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="Emoji Support"/>
<meta name="twitter:description" content="Emoji can be enabled in a Hugo project in a number of ways."/>

  <!--[if lte IE 9]>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/classlist/1.1.20170427/classList.min.js"></script>
  <![endif]-->

  <!--[if lt IE 9]>
  <script src="https://cdn.jsdelivr.net/npm/html5shiv@3.7.3/dist/html5shiv.min.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/respond.js@1.4.2/dest/respond.min.js"></script>
  <![endif]-->

  </head>

  <body>
    
  <h1>Emoji Support</h1>
  <header>
  
  <div class="avatar">
    <img class="avatarMask" src="https://dengxiujun.gitee.io/img/avatar.jpg">
    <a href="https://dengxiujun.gitee.io"><img src="https://dengxiujun.gitee.io/img/avatar-border.svg" }}></a>
  </div>
  
  <h2><a class="author" href="https://dengxiujun.gitee.io" style="text-decoration:none;"></a></h2>
</header>

  
  <p class="date">March 5, 2019</p>
  
  <div id="contentBody">
    <p>Emoji can be enabled in a Hugo project in a number of ways.</p>

<p>The <a href="https://gohugo.io/functions/emojify/"><code>emojify</code></a> function can be called directly in templates or <a href="https://gohugo.io/templates/shortcode-templates/#inline-shortcodes">Inline Shortcodes</a>.</p>

<p>To enable emoji globally, set <code>enableEmoji</code> to <code>true</code> in your site’s <a href="https://gohugo.io/getting-started/configuration/">configuration</a> and then you can type emoji shorthand codes directly in content files; e.g.</p>

<p><p><span class="nowrap"><span class="emojify">🙈</span> <code>:see_no_evil:</code></span>  <span class="nowrap"><span class="emojify">🙉</span> <code>:hear_no_evil:</code></span>  <span class="nowrap"><span class="emojify">🙊</span> <code>:speak_no_evil:</code></span></p>
<br></p>

<p>The <a href="http://www.emoji-cheat-sheet.com/">Emoji cheat sheet</a> is a useful reference for emoji shorthand codes.</p>

<hr />

<p><strong>N.B.</strong> The above steps enable Unicode Standard emoji characters and sequences in Hugo, however the rendering of these glyphs depends on the browser and the platform. To style the emoji you can either use a third party emoji font or a font stack; e.g.</p>

<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-html" data-lang="html">.emoji {
font-family: Apple Color Emoji,Segoe UI Emoji,NotoColorEmoji,Segoe UI Symbol,Android Emoji,EmojiSymbols;
}</code></pre></div>
  </div>
  <footer>
  <p>
  &copy; 2019 .
  Powered by <a href="https://gohugo.io/">Hugo</a>
  using the <a href="https://github.com/koirand/pulp/">pulp</a> theme.
  </p>
</footer>


  </body>
</html>
